package com.yanqu.road.entity.activity.huashigang;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

/**
 * 精英怪伤害排行奖励
 */
@FieldTypeAnnotation(tableName = "t_c_huashigang_elite_reward")
public class HuaShiGangEliteReward extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private long activityId;

    @FieldTypeAnnotation(desc = "精英怪y坐标", update = true)
    private int y;

    @FieldTypeAnnotation(desc = "排行", update = true)
    private int rank;

    @FieldTypeAnnotation(desc = "事件ID")
    private int eventId;

    @FieldTypeAnnotation(desc = "服务器ID", update = true)
    private long serverId;

    @FieldTypeAnnotation(desc = "用户ID", update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "奖励")
    private String reward = "";

    @FieldTypeAnnotation(desc = "是否领奖：0未领，1已领")
    private boolean isGetReward;

    public void setActivityId(long activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public void setY(int y) {
        if (this.y != y) {
            this.y = y;
            setOp(DataStatus.Update);
        }
    }

    public void setRank(int rank) {
        if (this.rank != rank) {
            this.rank = rank;
            setOp(DataStatus.Update);
        }
    }

    public void setEventId(int eventId) {
        if (this.eventId != eventId) {
            this.eventId = eventId;
            setOp(DataStatus.Update);
        }
    }

    public void setServerId(long serverId) {
        if (this.serverId != serverId) {
            this.serverId = serverId;
            setOp(DataStatus.Update);
        }
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public void setReward(String reward) {
        if (null == reward) {
            return;
        }
        if (!this.reward.equals(reward)) {
            this.reward = reward;
            setOp(DataStatus.Update);
        }
    }

    public void setIsGetReward(boolean isGetReward) {
        if (this.isGetReward != isGetReward) {
            this.isGetReward = isGetReward;
            setOp(DataStatus.Update);
        }
    }

    public long getActivityId() {
        return activityId;
    }

    public int getY() {
        return y;
    }

    public int getRank() {
        return rank;
    }

    public int getEventId() {
        return eventId;
    }

    public long getServerId() {
        return serverId;
    }

    public long getUserId() {
        return userId;
    }

    public String getReward() {
        return reward;
    }

    public boolean isGetReward() {
        return isGetReward;
    }

}
